<? session_start(); ?>
<html>

<head>
<?
include("../../MerchandiseBay/conn.php");

      $username=$_REQUEST['username'];
      $password=$_REQUEST['password'];
 
	
  	  $sql="select * from users where username='$username' and password='$password'";
  	  $qry=mysql_query($sql,$conn);
  	
     if(mysql_num_rows($qry)==0)
  	   { ?>
  	     <script language=javascript>
  	     window.alert("Wrong username or password!");
  	     history.back()
  	    </script>
  	   <?}
  	 else
  	   {
  	    
	    $_SESSION['username'] = $username;
	    $username1=$_SESSION['username'];
	    session_register($username1); 
	    
  	   ?>
  	   <script language=javascript>
  	     window.location.assign("mBay2.php");
  	    </script>
  	  
  	   <?}
  	  ?>



<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>



</html>
